package people.paper.tv.activity.home.modual.ydtj.model.impl;

import android.content.Context;

import com.coocaa.app.support.net.Callback;
import com.coocaa.app.support.net.Result;

import java.util.List;

import people.paper.tv.activity.home.model.MainDataObject;
import people.paper.tv.activity.home.model.MainServerHttpService;
import people.paper.tv.activity.home.modual.ydtj.model.YDTJModel;

public class YDTJModelImpl implements YDTJModel {
    @Override
    public void create(Context context) {

    }

    @Override
    public void get(int pageIndex, final Callback<Result<List<MainDataObject.YWYLObject>>> callback) {
        MainServerHttpService.httpService.getPictures("DS阅读文章", pageIndex, new Callback<Result<MainDataObject.YWYLData>>() {
            @Override
            public Ret onResult(Result<MainDataObject.YWYLData> result) {
                return callback.onResult(Result.cc(result, result.data.obj));
            }
        });
    }
}
